<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
  th:replace="header" lang="en">
<div th:fragment="content">
    <!-- 添加任务 -->
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <h4>发布填报任务</h4>
                </div>
                <div class="card-body">
                    <div id="taskId" th:data="-999999">
                        <div class="form-group">
                            <label for="taskName">任务名称</label>
                            <input id="taskName" name="taskName" class="form-control" type="text" placeholder="表单名称">
                        </div>

                        <div class="form-group">
                            <label for="template">填报模板</label>
                            <select id="template" name="example-select" class="form-control">
                                <option value="0">请选择填报模板</option>
                                <option th:each="template : ${templateList}"
                                        th:value="${template.getTemplateId()}"
                                        th:text="${template.getTemplateName()}">???</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="start_time">任务开始时间</label>
                            <input id="start_time" name="startTime" class="form-control" type="datetime-local" placeholder="2020-02-23">
                        </div>

                        <div class="form-group">
                            <label for="end_time">任务结束时间</label>
                            <input id="end_time" name="endTime" class="form-control" type="datetime-local" placeholder="2020-02-23">
                        </div>

                        <div class="form-group">
                            <label for="range">发布范围</label>
                        <div id="range" class="table-responsive">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input name="checkbox" type="checkbox" id="check-all">
                                            <span> 全选</span>
                                        </label>
                                    </th>
                                    <th style="width: 24px;"></th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="college : ${colleges}" th:id="${college.getCollege()}" >
                                    <td class="p-l-20">
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input name="rules[]" type="checkbox" class="checkbox-parent checkbox-child"
                                                   th:dataid="'id-1-'+${college.getCollege()}" th:value="${college.getCollege()}">
                                            <span th:text="${college.getCollege()}"> ???学院</span>
                                        </label>
                                    </td>
                                    <td style="width: 64px;" th:onclick="showCollege([[${college.getCollege()}]])">
                                        <!-- 向下 -->
<!--                                        <i class="mdi mdi-arrow-down-drop-circle-outline"></i>-->
                                        <!-- 向右 -->
                                        <i class="mdi mdi-arrow-right-drop-circle-outline"></i>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        </div>
                        <div class="form-group">
                            <button type="button" onclick="saveTask()" class="btn btn-info">发布任务</button>
<!--                            <button onclick="reset()" type="button" class="btn btn-danger">清除设置</button>-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/assets/js/chosen.jquery.min.js"></script>
    <script src="/assets/js/task/script.js"></script>
</div>
</html>